// Licensed to Elasticsearch B.V under one or more agreements.
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
// See the LICENSE file in the project root for more information.
//
// ███╗   ██╗ ██████╗ ████████╗██╗ ██████╗███████╗
// ████╗  ██║██╔═══██╗╚══██╔══╝██║██╔════╝██╔════╝
// ██╔██╗ ██║██║   ██║   ██║   ██║██║     █████╗
// ██║╚██╗██║██║   ██║   ██║   ██║██║     ██╔══╝
// ██║ ╚████║╚██████╔╝   ██║   ██║╚██████╗███████╗
// ╚═╝  ╚═══╝ ╚═════╝    ╚═╝   ╚═╝ ╚═════╝╚══════╝
// ------------------------------------------------
//
// This file is automatically generated.
// Please do not edit these files manually.
//
// ------------------------------------------------

#nullable restore

using Elastic.Clients.Elasticsearch.Serverless.Fluent;
using Elastic.Clients.Elasticsearch.Serverless.Requests;
using Elastic.Clients.Elasticsearch.Serverless.Serialization;
using Elastic.Transport;
using System;
using System.Collections.Generic;
using System.Linq.Expressions;
using System.Text.Json;
using System.Text.Json.Serialization;

namespace Elastic.Clients.Elasticsearch.Serverless.MachineLearning;

public sealed partial class GetDataFrameAnalyticsRequestParameters : RequestParameters
{
	/// <summary>
	/// <para>Specifies what to do when the request:</para>
	/// <para>1. Contains wildcard expressions and there are no data frame analytics<br/>jobs that match.<br/>2. Contains the `_all` string or no identifiers and there are no matches.<br/>3. Contains wildcard expressions and there are only partial matches.</para>
	/// <para>The default value returns an empty data_frame_analytics array when there<br/>are no matches and the subset of results when there are partial matches.<br/>If this parameter is `false`, the request returns a 404 status code when<br/>there are no matches or only partial matches.</para>
	/// </summary>
	public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }

	/// <summary>
	/// <para>Indicates if certain fields should be removed from the configuration on<br/>retrieval. This allows the configuration to be in an acceptable format to<br/>be retrieved and then added to another cluster.</para>
	/// </summary>
	public bool? ExcludeGenerated { get => Q<bool?>("exclude_generated"); set => Q("exclude_generated", value); }

	/// <summary>
	/// <para>Skips the specified number of data frame analytics jobs.</para>
	/// </summary>
	public int? From { get => Q<int?>("from"); set => Q("from", value); }

	/// <summary>
	/// <para>Specifies the maximum number of data frame analytics jobs to obtain.</para>
	/// </summary>
	public int? Size { get => Q<int?>("size"); set => Q("size", value); }
}

/// <summary>
/// <para>Retrieves configuration information for data frame analytics jobs.<br/>You can get information for multiple data frame analytics jobs in a single<br/>API request by using a comma-separated list of data frame analytics jobs or a<br/>wildcard expression.</para>
/// </summary>
public sealed partial class GetDataFrameAnalyticsRequest : PlainRequest<GetDataFrameAnalyticsRequestParameters>
{
	public GetDataFrameAnalyticsRequest()
	{
	}

	public GetDataFrameAnalyticsRequest(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id))
	{
	}

	internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDataFrameAnalytics;

	protected override HttpMethod StaticHttpMethod => HttpMethod.GET;

	internal override bool SupportsBody => false;

	internal override string OperationName => "ml.get_data_frame_analytics";

	/// <summary>
	/// <para>Specifies what to do when the request:</para>
	/// <para>1. Contains wildcard expressions and there are no data frame analytics<br/>jobs that match.<br/>2. Contains the `_all` string or no identifiers and there are no matches.<br/>3. Contains wildcard expressions and there are only partial matches.</para>
	/// <para>The default value returns an empty data_frame_analytics array when there<br/>are no matches and the subset of results when there are partial matches.<br/>If this parameter is `false`, the request returns a 404 status code when<br/>there are no matches or only partial matches.</para>
	/// </summary>
	[JsonIgnore]
	public bool? AllowNoMatch { get => Q<bool?>("allow_no_match"); set => Q("allow_no_match", value); }

	/// <summary>
	/// <para>Indicates if certain fields should be removed from the configuration on<br/>retrieval. This allows the configuration to be in an acceptable format to<br/>be retrieved and then added to another cluster.</para>
	/// </summary>
	[JsonIgnore]
	public bool? ExcludeGenerated { get => Q<bool?>("exclude_generated"); set => Q("exclude_generated", value); }

	/// <summary>
	/// <para>Skips the specified number of data frame analytics jobs.</para>
	/// </summary>
	[JsonIgnore]
	public int? From { get => Q<int?>("from"); set => Q("from", value); }

	/// <summary>
	/// <para>Specifies the maximum number of data frame analytics jobs to obtain.</para>
	/// </summary>
	[JsonIgnore]
	public int? Size { get => Q<int?>("size"); set => Q("size", value); }
}

/// <summary>
/// <para>Retrieves configuration information for data frame analytics jobs.<br/>You can get information for multiple data frame analytics jobs in a single<br/>API request by using a comma-separated list of data frame analytics jobs or a<br/>wildcard expression.</para>
/// </summary>
public sealed partial class GetDataFrameAnalyticsRequestDescriptor<TDocument> : RequestDescriptor<GetDataFrameAnalyticsRequestDescriptor<TDocument>, GetDataFrameAnalyticsRequestParameters>
{
	internal GetDataFrameAnalyticsRequestDescriptor(Action<GetDataFrameAnalyticsRequestDescriptor<TDocument>> configure) => configure.Invoke(this);

	public GetDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id))
	{
	}

	public GetDataFrameAnalyticsRequestDescriptor()
	{
	}

	internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDataFrameAnalytics;

	protected override HttpMethod StaticHttpMethod => HttpMethod.GET;

	internal override bool SupportsBody => false;

	internal override string OperationName => "ml.get_data_frame_analytics";

	public GetDataFrameAnalyticsRequestDescriptor<TDocument> AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch);
	public GetDataFrameAnalyticsRequestDescriptor<TDocument> ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated);
	public GetDataFrameAnalyticsRequestDescriptor<TDocument> From(int? from) => Qs("from", from);
	public GetDataFrameAnalyticsRequestDescriptor<TDocument> Size(int? size) => Qs("size", size);

	public GetDataFrameAnalyticsRequestDescriptor<TDocument> Id(Elastic.Clients.Elasticsearch.Serverless.Id? id)
	{
		RouteValues.Optional("id", id);
		return Self;
	}

	protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
	{
	}
}

/// <summary>
/// <para>Retrieves configuration information for data frame analytics jobs.<br/>You can get information for multiple data frame analytics jobs in a single<br/>API request by using a comma-separated list of data frame analytics jobs or a<br/>wildcard expression.</para>
/// </summary>
public sealed partial class GetDataFrameAnalyticsRequestDescriptor : RequestDescriptor<GetDataFrameAnalyticsRequestDescriptor, GetDataFrameAnalyticsRequestParameters>
{
	internal GetDataFrameAnalyticsRequestDescriptor(Action<GetDataFrameAnalyticsRequestDescriptor> configure) => configure.Invoke(this);

	public GetDataFrameAnalyticsRequestDescriptor(Elastic.Clients.Elasticsearch.Serverless.Id? id) : base(r => r.Optional("id", id))
	{
	}

	public GetDataFrameAnalyticsRequestDescriptor()
	{
	}

	internal override ApiUrls ApiUrls => ApiUrlLookup.MachineLearningGetDataFrameAnalytics;

	protected override HttpMethod StaticHttpMethod => HttpMethod.GET;

	internal override bool SupportsBody => false;

	internal override string OperationName => "ml.get_data_frame_analytics";

	public GetDataFrameAnalyticsRequestDescriptor AllowNoMatch(bool? allowNoMatch = true) => Qs("allow_no_match", allowNoMatch);
	public GetDataFrameAnalyticsRequestDescriptor ExcludeGenerated(bool? excludeGenerated = true) => Qs("exclude_generated", excludeGenerated);
	public GetDataFrameAnalyticsRequestDescriptor From(int? from) => Qs("from", from);
	public GetDataFrameAnalyticsRequestDescriptor Size(int? size) => Qs("size", size);

	public GetDataFrameAnalyticsRequestDescriptor Id(Elastic.Clients.Elasticsearch.Serverless.Id? id)
	{
		RouteValues.Optional("id", id);
		return Self;
	}

	protected override void Serialize(Utf8JsonWriter writer, JsonSerializerOptions options, IElasticsearchClientSettings settings)
	{
	}
}